//package com.wxy.demo.filter;
//
//import org.springframework.stereotype.Component;
//
//import javax.servlet.*;
//import javax.servlet.http.HttpServletRequest;
//import java.io.IOException;
//
///**
// * <p>
// * 过滤器
// * </p>
// *
// * @author e-Xiaoyuan.Wang
// * @since 2022/9/16 9:31
// */
////@Component
//public class MyFilter implements Filter {
//    @Override
//    public void init(FilterConfig filterConfig) throws ServletException {
//        Filter.super.init(filterConfig);
//        System.out.println("过滤器初始化...");
//    }
//
//    @Override
//    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
//        HttpServletRequest request = (HttpServletRequest) servletRequest;
//        System.out.println("请求地址：" + request.getRequestURL());
//        System.out.println("请求开始...");
//        filterChain.doFilter(servletRequest, servletResponse);
//        System.out.println("请求结束...");
//    }
//
//    @Override
//    public void destroy() {
//        Filter.super.destroy();
//        System.out.println("过滤器被销毁...");
//    }
//}
